﻿<@override name="head">
<title>客户账号管理</title>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/table.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/back/clientAccount.js"></script>
</@override>
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
    <div id= "pagecontent">
    	<div id="content">
   			<div id="navDiv">
				<ul id="navDiv_ul">
					<li><i class="icon-home"></i></li>
					<li><a href="${ctx}/back/main/dashboard">首页</a></li>
					<li><i class="icon-angle-right"></i></li>
				    <li class="navDiv_currentLi">客户账号管理</li>
				</ul>  
 			</div>
 			<form id="myform" action="${ctx}/back/main/client-account/list" method="post">
 				<input type="hidden" id="sysType" name="sysType" value="${sysType!}"/>
 				<div id="selectBar_clientaccount" class="selectBar">
	 				<span>账号类型：</span>
					<a id="actype_0" value="0">全部</a>
			        <a id="actype_2" value="2">媒体</a>
					<a id="actype_3" value="3">需求方</a>
			    </div>
 				<div id="navButtons_other">
					<div id="button">		
						<a href="${ctx}/back/main/client-account/correlation" class="btn2">账号关联</a>
						<a href="javascript:void(0);" onclick="create_acc()"  id="create_rela" class="btn2">创建账号</a>
						<a class="btn2" id="all-btn-enable">批量开启</a>
						<a class="btn2" id="all-btn-disable">批量停用</a>
					</div>
					<div id="searchValueDiv">
						<input type="hidden" id="page" name="page" value="${pager.page}"/>
						<input id="searchValue" type="text" name="searchValue" value="${searchValue!}" tabindex="1" placeholder="请输入公司名称"/>
						<input id="serachData_img" type="submit" value=""/>
					</div>
				</div>
				<table border="1" class="tableFig">
					<thead>
						<tr class="theadTr">
							<th class="theadTh" style="width:5%;"><div class="checkboxStyleTh"></div></th>
							<th class="theadTh" style="width:5%">ID</th>
							<th class="theadTh" style="width:10%">账号</th>
							<th class="theadTh" style="width:10%">公司名称</th>
							<th class="theadTh" style="width:8%">联系人</th>
							<th class="theadTh" style="width:10%">移动电话</th>
							<th class="theadTh" style="width:10%">固定电话</th>
							<th class="theadTh" style="width:10%">账号类型</th>
							<th class="theadTh" style="width:5%">状态</th>
							<th class="theadTh" style="width:12%">最后登录时间</th>
							<th class="theadTh" style="width:30%;">操作</th>
						</tr>
				    </thead>
				    <tbody>
						<#if clientAccountsList ??>
				        <#list clientAccountsList as account>
				        <tr id="tbodyTr">
							<td class="tbodyTd"><div class="checkboxStyleTd" id="${account.id!}"></div></td>
							<td class="tbodyTd">${account.id!}</td>
							<td class="tbodyTd">${account.accountName!}</td>
							<td class="tbodyTd">${account.companyName!}</td>
							<td class="tbodyTd">${account.linkMan!}</td>
							<td class="tbodyTd">${account.mobilePhone!}</td>
							<td class="tbodyTd">${account.tel!}</td>
							<td class="tbodyTd"><#if account.sysType==2>媒体<#elseif account.sysType==3>需求方</#if></td>
						 	<td class="tbodyTd"><#if (account.status==1 && account.sysType==2)||( account.sysType==3 && account.status=1)>正常<#else>暂停</#if></td> 
							<td class="tbodyTd">${account.loginTime!?datetime}</td>
							<td class="tbodyTd">
								<div id="listButtons">
									<a href="${ctx}/back/main/client-account/edit?accountId=${account.id!}" class="btn3">编辑</a>
									<#if (account.status==1 && account.sysType==2)||( account.sysType==3 && account.status=1)>
									<a id="btn-disable" value="${account.id!}" class="btn3">停用</a>
									<#else>
									<a id="btn-enable" value="${account.id!}" class="btn3">开启</a>
									</#if>
								</div>
							</td>
						</tr>
				        </#list>
						</#if>           
				    </tbody>
				</table>
				<div id="exportReport">
					<a id="exportExcel" class="btn_export" href="javascript:void(0);" onclick="exportExcel_list()">导出Excel</a>
				</div>
				<div id="pageDiv">
					<#include "/common/pagination/simple.ftl"/>
				</div>
 			</form>
		</div>
	</div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>